'''
* This is the projet for Brtc LlmOps Platform
* @Author Leon-liao <liaosiliang@alltman.com>
* @Description //TODO 
* @File: demo_task.py
* @Time: 2025/9/25
* @All Rights Reserve By Brtc
'''
import logging
import time
from uuid import UUID

from celery import shared_task
from flask import current_app


@shared_task
def demo_task(id:UUID)->str:
    """测试异步任务"""
    logging.info("协程任务开始睡眠5秒")
    time.sleep(5)
    logging.info("协程睡眠完毕")
    logging.info(f"id:的值:{id}")
    logging.info(f"配置信息:{current_app.config}")
    return "博小睿"